#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
void my_qsort(int* arr,int len)
{
	int i = 0, j = 0;
	for (int i = 0; i < len; i++)
	{
		for (j = 0; j < len - i - 1; j++)
		{
			if (*(arr+j) > *(arr + j + 1))
			{
				int tmp;
				tmp = *(arr + j);
				*(arr + j) = *(arr + j + 1);
				*(arr + j + 1) = tmp;
			}
		}
	}
}
int main()
{
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	int len = sizeof(arr) / sizeof(arr[0]);
	my_qsort(arr,len);
	for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}